<?php
namespace app\admin\controller;
use think\Db;
use think\Controller;

class Reply extends Base {
    function index(){
        $reply_list=Db::name('reply')->alias('a')->join('article w','a.m_id=w.id')->field('a.*,w.title')->order('time','desc')->select();
        $this->assign('reply_list',$reply_list);
        return $this->fetch('reply_list');
    }
    function delete(){
        $id=input('get.id');
        Db::name('reply')->where('id',$id)->delete();
        return $this->success('删除成功！');
    }
}